import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    //患者信息管理页页
    {
      path: '/',
      name: 'LoginView',
      component: () => import('../views/SmartMedicalCare/LoginView.vue'),
    },
    {
      path: '/IndexView',
      name: 'IndexView',
      component: () => import('../views/IndexView.vue'),
      children: [
        //患者信息管理页页
        {
          path: '/PatientShowView',
          name: 'PatientShowView',
          component: () => import('../views/SmartMedicalCare/PatientShowView.vue'),
        },
        //患者信息管理页页
        {
          path: '/DepartmentOneView',
          name: 'DepartmentOneView',
          component: () => import('../views/SmartMedicalCare/DepartmentOneView.vue'),
        },
        {
          path: '/DepartmentTowView',
          name: 'DepartmentTowView',
          component: () => import('../views/SmartMedicalCare/DepartmentTowView.vue'),
        },
        //医院管理
        {
          path: '/HospitalShowView',
          name: 'HospitalShowView',
          component: () => import('../views/SmartMedicalCare/HospitalShowView.vue'),
        },
        {
          path: '/AddhospView',
          name: 'AddhospView',
          component: () => import('../views/SmartMedicalCare/AddhospView.vue'),
        },
        {
          path: '/UpdateHospView',
          name: 'UpdateHospView',
          component: () => import('../views/SmartMedicalCare/UpdatehospView.vue'),
        },
        //医院详情
        {
          path: '/QueryHospView',
          name: 'QueryHospView',
          component: () => import('../views/SmartMedicalCare/QueryhospView.vue'),
        },
      ]
    },

  ],
})

export default router
